import request from "@/api/request";
import {getEnterpriseId, getUserId} from "@/plugin/auth";

export const getMemberList = () => {
    const data = {
        user_id:getUserId(),
        enterprise_id:getEnterpriseId()
    }
    return request.get('/member',data)
}
export const memberDelete = (id:number) => {
    const data = {
        user_id:getUserId(),
        enterprise_id:getEnterpriseId(),
        id
    }
    return request.delete('/member/',data)
}
export const memberAdd = (data:any) => {
    const params = {
        user_id:getUserId(),
        enterprise_id:getEnterpriseId(),
        ...data
    }
    return request.post('/member',params)
}
export const memberUpdate = (data:any) => {
    const params = {
        user_id:getUserId(),
        enterprise_id:getEnterpriseId(),
        ...data
    }
    return request.put('/member',params)
}